package com.test3;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Admin on 9/17 0017.
 */
public class StaticFactory {
    private static Map<String,Car> map=new HashMap<String, Car>();

    static {
        map.put("audi",new Car("audi",300000));
        map.put("baoma",new Car("baoma",400000));
    }

    public static Car getCar(String name){
        return map.get(name);
    }
}
